<?php
html::printPath(array('room.form-title' => 'admin/room/all', 'application.page-title-display' => ''));
$msg->printMessages();

echo html::entityInfoIcon('room', $room, 'code');
?>

<ul class="commandList">
    <li class="deleteLi"><?php echo html::anchor('admin/room/delete?code=' . $room['code'], text::get('room.deleteThis'), array('onclick'=>'return confirmDeletion()')) ?></li>
    <li class="editLi"><?php echo html::anchor('admin/room/edit?code=' . $room['code'], text::get('room.editThis')) ?></li>
</ul>

<?php
$fb = new FormBuilder('room', $room);
$fb->displayOnly();
$fb->text('code')->identifyingValue();
$fb->combobox('building_code', $buildingOptions);
$fb->combobox('accomodation_type_code', $accomodationTypeOptions);
$fb->text('name');
$fb->textarea('description');
$fb->integer('capacity');
$fb->combobox('gender', $genderOptions);
$fb->textarea('notes');
$fb->write();

echo '<h3>' . text::getEscaped('application.localizedValues') . '</h3>';

echo '<ul class="commandList">';
echo '<li class="addLi">' . html::popupForm('admin/room/editLocalizedValues?room_code=' . $room['code'], text::get('application.createNewL10n')) . '</li>';
echo '</ul>';

$elb = new EntityListBuilder($this, $roomL10nList);
$elb->setUuid($this->DISPLAY_LOCALIZED_VALUE_LIST_UUID);
$elb->text('language_name')->linkWithParams('/admin/room/editLocalizedValues?room_code=%s&language_code=%s', array('room_code', 'language_code'));
$elb->text('name');
$elb->text('description');
$elb->write();
